﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wormhole.Engine.Communication.Messages
{
	/// <author>Hannes Foulds</author>
	/// <date>26 September 2008</date>
	/// <summary>
	/// Represents "mulligan" or "keep hand" messages.
	/// </summary>
	public class HandMessage : Message
	{
		#region Constructor
		/// <summary>
		/// Initialize a new instance of the class.
		/// </summary>
		/// <param name="action">The action the message is for.</param>
		public HandMessage(Actions action)
		{
			this.Action = action;
		}

		/// <summary>
		/// Initialize an instace from its string representation.
		/// </summary>
		/// <param name="message">The string representation.</param>
		/// <param name="action">The action.</param>
		public HandMessage(string message, Actions action)
		{
			this.Action = action;
			this.Parse(message);
		}
		#endregion

		#region To String
		/// <summary>
		/// Convert the message to a string that can be send via the communications channel.
		/// </summary>
		/// <returns>Returns the string representation of the message.</returns>
		public override string ToString()
		{
			return EnumConvertor<Actions>.ToString(this.Action);
		}
		#endregion

		#region Parse
		/// <summary>
		/// Parse a received game list message.
		/// </summary>
		/// <param name="message">The string message to parse.</param>
		protected void Parse(string message)
		{
		}
		#endregion
	}
}
